home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / dev / lang / SmallEiffel.lha / SmallEiffel / bin_c / short2.c < prev    next >
C/C++ Source or Header  |  1998-12-22  |  5KB  |  366 lines

  1. /*
  2. -- ANSI C code generated by :
  3. -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.79)      --
  4. -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
  5. -- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
  6. --                 http://www.loria.fr/SmallEiffel              --
  7. */
  8. #include "short.h"
  9.  
  10.  
  11. T227 r227realloc(T227 C,T2 a1,T2 a2){
  12. T227 R=NULL;
  13. R=calloc(a2,sizeof(T0*));
  14. r227copy_from(R,C,(a1)-(1));
  15. return R;
  16. }
  17.  
  18.  
  19. void r227copy_from(T227 C,T227 a1,T2 a2){
  20. T2 _i=0;
  21. _i=a2;
  22. while (!((_i)<(0))) {
  23. (C)[_i]=((a1)[_i]);
  24. _i=(_i)-(1);
  25. }
  26. }
  27.  
  28.  
  29. T70 r70realloc(T70 C,T2 a1,T2 a2){
  30. T70 R=NULL;
  31. R=calloc(a2,sizeof(T0*));
  32. r70copy_from(R,C,(a1)-(1));
  33. return R;
  34. }
  35.  
  36.  
  37. T6 r70equal_like(T0* a1,T0* a2){
  38. T6 R=0;
  39. /*[IF*/
  40. /*AF*//*AF*/if((a1)==((void*)(a2))){
  41. R=1;
  42. }
  43.  else if(((a1)==((void*)(NULL)))||((a2)==((void*)(NULL)))){
  44. }
  45. else{
  46. R=r69is_equal(((T69*)a1),a2);
  47. }
  48. /*FI]*/
  49. return R;
  50. }
  51.  
  52.  
  53. T2 r70fast_index_of(T70 C,T0* a1,T2 a2){
  54. T2 R=0;
  55. while (!(((R)>(a2))||((a1)==((void*)((C)[R]))))) {
  56. R=(R)+(1);
  57. }
  58. return R;
  59. }
  60.  
  61.  
  62. void r70copy_from(T70 C,T70 a1,T2 a2){
  63. T2 _i=0;
  64. _i=a2;
  65. while (!((_i)<(0))) {
  66. (C)[_i]=((a1)[_i]);
  67. _i=(_i)-(1);
  68. }
  69. }
  70.  
  71.  
  72. T2 r70index_of(T70 C,T0* a1,T2 a2){
  73. T2 R=0;
  74. while (!(((R)>(a2))||(r70equal_like(a1,(C)[R])))) {
  75. R=(R)+(1);
  76. }
  77. return R;
  78. }
  79.  
  80.  
  81. T353 r353realloc(T353 C,T2 a1,T2 a2){
  82. T353 R=NULL;
  83. R=calloc(a2,sizeof(T0*));
  84. r353copy_from(R,C,(a1)-(1));
  85. return R;
  86. }
  87.  
  88.  
  89. void r353clear_all(T353 C,T2 a1){
  90. T2 _i=0;
  91. T0* _v=NULL;
  92. _i=a1;
  93. while (!((_i)<(0))) {
  94. (C)[_i]=(_v);
  95. _i=(_i)-(1);
  96. }
  97. }
  98.  
  99.  
  100. void r353copy_from(T353 C,T353 a1,T2 a2){
  101. T2 _i=0;
  102. _i=a2;
  103. while (!((_i)<(0))) {
  104. (C)[_i]=((a1)[_i]);
  105. _i=(_i)-(1);
  106. }
  107. }
  108.  
  109.  
  110. T65 r65realloc(T65 C,T2 a1,T2 a2){
  111. T65 R=NULL;
  112. R=calloc(a2,sizeof(T0*));
  113. r65copy_from(R,C,(a1)-(1));
  114. return R;
  115. }
  116.  
  117.  
  118. void r65set_all_with(T65 C,T0* a1,T2 a2){
  119. T2 _i=0;
  120. _i=a2;
  121. while (!((_i)<(0))) {
  122. (C)[_i]=(a1);
  123. _i=(_i)-(1);
  124. }
  125. }
  126.  
  127.  
  128. T2 r65fast_index_of(T65 C,T0* a1,T2 a2){
  129. T2 R=0;
  130. while (!(((R)>(a2))||((a1)==((void*)((C)[R]))))) {
  131. R=(R)+(1);
  132. }
  133. return R;
  134. }
  135.  
  136.  
  137. void r65copy_from(T65 C,T65 a1,T2 a2){
  138. T2 _i=0;
  139. _i=a2;
  140. while (!((_i)<(0))) {
  141. (C)[_i]=((a1)[_i]);
  142. _i=(_i)-(1);
  143. }
  144. }
  145.  
  146.  
  147. T99 r99realloc(T99 C,T2 a1,T2 a2){
  148. T99 R=NULL;
  149. R=calloc(a2,sizeof(T0*));
  150. r99copy_from(R,C,(a1)-(1));
  151. return R;
  152. }
  153.  
  154.  
  155. void r99clear_all(T99 C,T2 a1){
  156. T2 _i=0;
  157. T0* _v=NULL;
  158. _i=a1;
  159. while (!((_i)<(0))) {
  160. (C)[_i]=(_v);
  161. _i=(_i)-(1);
  162. }
  163. }
  164.  
  165.  
  166. void r99copy_from(T99 C,T99 a1,T2 a2){
  167. T2 _i=0;
  168. _i=a2;
  169. while (!((_i)<(0))) {
  170. (C)[_i]=((a1)[_i]);
  171. _i=(_i)-(1);
  172. }
  173. }
  174.  
  175.  
  176. T185 r185realloc(T185 C,T2 a1,T2 a2){
  177. T185 R=NULL;
  178. R=calloc(a2,sizeof(T0*));
  179. r185copy_from(R,C,(a1)-(1));
  180. return R;
  181. }
  182.  
  183.  
  184. void r185copy_from(T185 C,T185 a1,T2 a2){
  185. T2 _i=0;
  186. _i=a2;
  187. while (!((_i)<(0))) {
  188. (C)[_i]=((a1)[_i]);
  189. _i=(_i)-(1);
  190. }
  191. }
  192.  
  193.  
  194. T347 r347realloc(T347 C,T2 a1,T2 a2){
  195. T347 R=NULL;
  196. R=calloc(a2,sizeof(T6));
  197. r347copy_from(R,C,(a1)-(1));
  198. return R;
  199. }
  200.  
  201.  
  202. void r347set_all_with(T347 C,T6 a1,T2 a2){
  203. T2 _i=0;
  204. _i=a2;
  205. while (!((_i)<(0))) {
  206. (C)[_i]=(a1);
  207. _i=(_i)-(1);
  208. }
  209. }
  210.  
  211.  
  212. void r347move(T347 C,T2 a1,T2 a2,T2 a3){
  213. T2 _i=0;
  214. /*[IF*/
  215. if((a3)==(0)){
  216. }
  217.  else if((a3)<(0)){
  218. _i=a1;
  219. while (!((_i)>(a2))) {
  220. (C)[(_i)+(a3)]=((C)[_i]);
  221. _i=(_i)+(1);
  222. }
  223. }
  224. else{
  225. _i=a2;
  226. while (!((_i)<(a1))) {
  227. (C)[(_i)+(a3)]=((C)[_i]);
  228. _i=(_i)-(1);
  229. }
  230. }
  231. /*FI]*/
  232. }
  233.  
  234.  
  235. void r347copy_from(T347 C,T347 a1,T2 a2){
  236. T2 _i=0;
  237. _i=a2;
  238. while (!((_i)<(0))) {
  239. (C)[_i]=((a1)[_i]);
  240. _i=(_i)-(1);
  241. }
  242. }
  243.  
  244.  
  245. void r347clear(T347 C,T2 a1,T2 a2){
  246. T2 _i=0;
  247. T6 _v=0;
  248. _i=a1;
  249. while (!((_i)>(a2))) {
  250. (C)[_i]=(_v);
  251. _i=(_i)+(1);
  252. }
  253. }
  254.  
  255.  
  256. T63 r63realloc(T63 C,T2 a1,T2 a2){
  257. T63 R=NULL;
  258. R=calloc(a2,sizeof(T2));
  259. r63copy_from(R,C,(a1)-(1));
  260. return R;
  261. }
  262.  
  263.  
  264. void r63set_all_with(T63 C,T2 a1,T2 a2){
  265. T2 _i=0;
  266. _i=a2;
  267. while (!((_i)<(0))) {
  268. (C)[_i]=(a1);
  269. _i=(_i)-(1);
  270. }
  271. }
  272.  
  273.  
  274. T2 r63fast_index_of(T63 C,T2 a1,T2 a2){
  275. T2 R=0;
  276. while (!(((R)>(a2))||((a1)==((C)[R])))) {
  277. R=(R)+(1);
  278. }
  279. return R;
  280. }
  281.  
  282.  
  283. void r63copy_from(T63 C,T63 a1,T2 a2){
  284. T2 _i=0;
  285. _i=a2;
  286. while (!((_i)<(0))) {
  287. (C)[_i]=((a1)[_i]);
  288. _i=(_i)-(1);
  289. }
  290. }
  291.  
  292.  
  293. T342 r342realloc(T342 C,T2 a1,T2 a2){
  294. T342 R=NULL;
  295. R=calloc(a2,sizeof(T0*));
  296. r342copy_from(R,C,(a1)-(1));
  297. return R;
  298. }
  299.  
  300.  
  301. void r342set_all_with(T342 C,T0* a1,T2 a2){
  302. T2 _i=0;
  303. _i=a2;
  304. while (!((_i)<(0))) {
  305. (C)[_i]=(a1);
  306. _i=(_i)-(1);
  307. }
  308. }
  309.  
  310.  
  311. T2 r342fast_index_of(T342 C,T0* a1,T2 a2){
  312. T2 R=0;
  313. while (!(((R)>(a2))||((a1)==((void*)((C)[R]))))) {
  314. R=(R)+(1);
  315. }
  316. return R;
  317. }
  318.  
  319.  
  320. void r342copy_from(T342 C,T342 a1,T2 a2){
  321. T2 _i=0;
  322. _i=a2;
  323. while (!((_i)<(0))) {
  324. (C)[_i]=((a1)[_i]);
  325. _i=(_i)-(1);
  326. }
  327. }
  328.  
  329.  
  330. T339 r339realloc(T339 C,T2 a1,T2 a2){
  331. T339 R=NULL;
  332. R=calloc(a2,sizeof(T0*));
  333. r339copy_from(R,C,(a1)-(1));
  334. return R;
  335. }
  336.  
  337.  
  338. void r339set_all_with(T339 C,T0* a1,T2 a2){
  339. T2 _i=0;
  340. _i=a2;
  341. while (!((_i)<(0))) {
  342. (C)[_i]=(a1);
  343. _i=(_i)-(1);
  344. }
  345. }
  346.  
  347.  
  348. T2 r339fast_index_of(T339 C,T0* a1,T2 a2){
  349. T2 R=0;
  350. while (!(((R)>(a2))||((a1)==((void*)((C)[R]))))) {
  351. R=(R)+(1);
  352. }
  353. return R;
  354. }
  355.  
  356.  
  357. void r339copy_from(T339 C,T339 a1,T2 a2){
  358. T2 _i=0;
  359. _i=a2;
  360. while (!((_i)<(0))) {
  361. (C)[_i]=((a1)[_i]);
  362. _i=(_i)-(1);
  363. }
  364. }
  365.  
  366.